import request from '@/utils/request'

export function fetchMemberList(query) {
  return request({
    url: '/user/list',
    method: 'get',
    params: query
  })
}
export function fetchMemberDetail(id) {
  return request({
    url: '/user/detail',
    method: 'get',
    params: { id }
  })
}
export function fetchMemberByNames(query) {
  return request({
    url: '/user/names',
    method: 'get',
    params: query
  })
}
export function registerAdmin(query) {
  return request({
    url: '/user/register/admin',
    method: 'post',
    data: query
  })
}
export function updateMember(query) {
  return request({
    url: '/user/update',
    method: 'post',
    data: query
  })
}
export function deleteMember(data) {
  return request({
    url: '/user/delete',
    method: 'post',
    data
  })
}
